package com.miplus.ccrm.core.service.cust;

import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.miplus.ccrm.common.CmdResVo;
import com.miplus.ccrm.common.JPubUtils;
import com.miplus.ccrm.core.controller.vo.cust.CaseAddVo;
import com.miplus.ccrm.core.controller.vo.cust.CaseProcResVo;
import com.miplus.ccrm.core.pojo.ConCaseprocess;
import com.miplus.ccrm.core.mapper.ConCaseprocessMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
* @author pc
* @description 针对表【con_caseprocess(客户工单处理表)】的数据库操作Service实现
* @createDate 2024-03-20 20:27:29
*/
@Service
public class ConCaseprocessServiceImpl extends MPJBaseServiceImpl<ConCaseprocessMapper, ConCaseprocess>
    implements ConCaseprocessService{

    @Override
    public List<CaseProcResVo> caseProcessList(int caseid)
    {
        return selectJoinList(
                CaseProcResVo.class,
                new MPJLambdaWrapper<ConCaseprocess>()
                        .selectAs("(select dsc from sys_names n where n.tid='CASE.ACTION' and n.id=t.action)", CaseProcResVo::getActiondsc)
                        .selectAs("(select g.grpname from sys_grp g where g.grpid=t.sendtodept)",CaseProcResVo::getSendtodeptdsc)
                        .selectAll(ConCaseprocess.class)
                        .eq("casenumber",caseid)
                        .orderByDesc("processnumber")
        );
    }
}




